//
//  Response.h
//  PatientNew
//
//  Created by xxx on 14-7-11.
//  Copyright (c) 2014年 wtf. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Response : NSObject

// keys for contents
#define kResponseKeyErrCode @"result"
#define kResponseKeyErrMsg  @"error_msg"
#define kResponseKeyContent @"msg"

// error codes
#define kErrCodeNetworkNotAvailable -1
#define kErrCodeNil                  0
#define kErrCodeWrongParameter       2

@property (nonatomic, strong) NSDictionary *cookieDict;

@property (nonatomic, strong) NSData       *data;
@property (nonatomic, strong) NSString     *string;

@property (nonatomic)         BOOL         result;
@property (nonatomic, strong) NSString     *errorMsg;
@property (nonatomic, strong) NSString     *msg;

@property (nonatomic, strong) id content;
@property (nonatomic, strong) id obj;

+ (Response *)responseWithResult:(BOOL)result errorMsg:(NSString *)errorMsg;
+ (Response *)responseWithData:(NSData *)data;
+ (Response *)responseWithData:(NSData *)data andCookies:(NSArray *)cookies;

@end
